from appium.webdriver.common.mobileby import MobileBy

from Hogwarts.Homeworks.hw0701.page_objects.base import Base


class PageContactAddChoose(Base):

    _ITEM_ADD_BY_MANUAL = (MobileBy.XPATH, "//*[@text='手动输入添加']")

    def choose_by_manual(self):
        from Hogwarts.Homeworks.hw0701.page_objects.page_contact_add_edit import PageContactAddEdit

        self.find_and_click(*self._ITEM_ADD_BY_MANUAL)

        return PageContactAddEdit(self.driver)